/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.awt.*;

/**
 * <p>Project: jse2204 - Op4
 * <p>Powered by webrx On 2022-08-30 09:43:28
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Op4 {
    public static void main(String[] args) {
        //位运算  8位1字节 byte
        //二进制 0-1

        //八进制 0-7

        //十六进制 0-9 a b c d e f(15)  ff0000 255,0,0
        //Color red = new Color(137, 31, 179);


        //十进制 0-9
        System.out.println(10); //10
        System.out.println(010); //十进制8
        System.out.println(0b10); //二进制2
        System.out.println(0x10); //十六进制16
        System.out.println(0xff);//十六进制255

        //十进制6 转换为二进制 110
        System.out.println(Integer.toBinaryString(6));//110
        System.out.println(Integer.toHexString(6));//6
        System.out.println(Integer.toHexString(18));//12
        System.out.println(Integer.toOctalString(9));//11

        //其它进制转换为十进制
        System.out.println(Integer.valueOf("110", 2));
        System.out.println(Integer.valueOf("6", 16));
        System.out.println(Integer.valueOf("12",16));
        System.out.println(Integer.valueOf("11",8));

        //#ff0000  #000000 #ffffff rgb(255,255,255)

    }
}
